class Comment implements Comparable {

  static belongsTo = Post

  Post post
  String comment
  Commentator who = new Commentator()
  Date dateCreated

  static constraints = {
    comment(nullable: false, blank: false)
    who(nullable: false)
    dateCreated(nullable: true)
  }

  public int compareTo(Object o) {
    return dateCreated.compareTo(o.dateCreated)
  }
}    